package com.example.controller;
import com.example.pojo.Result;
import com.example.pojo.siteInfoPojo;
import com.example.pojo.torqueManagePojo;
import com.example.service.torqueManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * ClassName:torqueManageController
 * Description:
 *
 * @Author 赵永峰
 * @Create 2024/8/8 0:22
 * @Version 1.0
 */
@RestController
public class torqueManageController {
    @Autowired
    private torqueManageService torqueManageService;
    @PostMapping("/inquiryDataTorque")
    public Result inquiryDataTorque(@RequestBody  Map<String,Object> parameters){
        List<torqueManagePojo> torqueManagePojoList=torqueManageService.inquiryDataTorque(parameters);
        return Result.success(torqueManagePojoList);
    }


    //向过站信息中查询数据：根据开始日期、终止日期，和一个机型的字符串，是一个数组形式，向过站信息中查询信息
    @PostMapping("/siteInfoStartDateByEndDate")
    public Result siteInfoStartDateByEndDate(@RequestBody Map<String,Object> map){
        List<siteInfoPojo> siteInfoPojos=torqueManageService.siteInfoStartDateByEndDate(map);
        return Result.success(siteInfoPojos);
    }
}
